import 'package:flutterprovider/api/api.dart';
import 'package:flutterprovider/bean/user_bean.dart';
import 'package:flutterprovider/providers/base_model.dart';

class UserModel extends BaseModel {
  Api _api;

  UserModel(Api api) {
    this._api = api;
  }

  Future<Userbean> login(String loginName) async {
    load(true);
    Userbean result = await _api.login(loginName);
    load(false);
    return result;
  }
}
